package com.cnc.ssm.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author Hibernate CodeGenerator
 */
public class PwLoginInfo implements Serializable {

    /**
     * identifier field
     */
    private Long loginId;

    /**
     * nullable persistent field
     */
    private String operCode;

    /**
     * nullable persistent field
     */
    private String operName;

    /**
     * nullable persistent field
     */
    private java.util.Date loginTime;

    /**
     * nullable persistent field
     */
    private java.util.Date logoutTime;

    /**
     * nullable persistent field
     */
    private String loginAddr;

    /**
     * nullable persistent field
     */
//  liuwei修改过
//    private String instCode;
//
//    /**
//     * nullable persistent field
//     */
//    private String instName;
//
//    /**
//     * full constructor
//     */
    public PwLoginInfo(java.lang.Long loginId, java.lang.String operCode, java.lang.String operName, java.util.Date loginTime, java.util.Date logoutTime, java.lang.String loginAddr, java.lang.String instCode, java.lang.String instName) {
        this.loginId = loginId;
        this.operCode = operCode;
        this.operName = operName;
        this.loginTime = loginTime;
        this.logoutTime = logoutTime;
        this.loginAddr = loginAddr;
//        this.instCode = instCode;
//        this.instName = instName;
    }

    /**
     * default constructor
     */
    public PwLoginInfo() {
    }

    /**
     * minimal constructor
     */
    public PwLoginInfo(java.lang.Long loginId) {
        this.loginId = loginId;
    }

    public java.lang.Long getLoginId() {
        return this.loginId;
    }

    public void setLoginId(java.lang.Long loginId) {
        this.loginId = loginId;
    }

    public java.lang.String getOperCode() {
        return this.operCode;
    }

    public void setOperCode(java.lang.String operCode) {
        this.operCode = operCode;
    }

    public java.lang.String getOperName() {
        return this.operName;
    }

    public void setOperName(java.lang.String operName) {
        this.operName = operName;
    }

    public java.util.Date getLoginTime() {
        return this.loginTime;
    }

    public void setLoginTime(java.util.Date loginTime) {
        this.loginTime = loginTime;
    }

    public java.util.Date getLogoutTime() {
        return this.logoutTime;
    }

    public void setLogoutTime(java.util.Date logoutTime) {
        this.logoutTime = logoutTime;
    }

    public java.lang.String getLoginAddr() {
        return this.loginAddr;
    }

    public void setLoginAddr(java.lang.String loginAddr) {
        this.loginAddr = loginAddr;
    }
//  liuwei修改过

//    public java.lang.String getInstCode() {
//        return this.instCode;
//    }
//
//    public void setInstCode(java.lang.String instCode) {
//        this.instCode = instCode;
//    }
//
//    public java.lang.String getInstName() {
//        return this.instName;
//    }
//
//    public void setInstName(java.lang.String instName) {
//        this.instName = instName;
//    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("loginId", getLoginId())
                .toString();
    }

    public boolean equals(Object other) {
        if (!(other instanceof PwLoginInfo)) return false;
        PwLoginInfo castOther = (PwLoginInfo) other;
        return new EqualsBuilder()
                .append(this.getLoginId(), castOther.getLoginId())
                .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
                .append(getLoginId())
                .toHashCode();
    }

}
